package com.chen.tliaswebtest.utils;

/**
 * @author chen
 * @version 1.0
 * @create_date 2025/7/26
 * 操作当前登录员工ID
 */
public class CurrentHolderUtils {
    private CurrentHolderUtils() {
    }

    private static final ThreadLocal<Integer> CURRENT_LOCAL = new ThreadLocal<>();

    public static void setCurrentId(Integer employeeId) {
        CURRENT_LOCAL.set(employeeId);
    }

    public static Integer getCurrentId() {
        return CURRENT_LOCAL.get();
    }

    public static void remove() {
        CURRENT_LOCAL.remove();
    }
}
